/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package ke.me.muhia.mvn.app.ucip;

import java.beans.PropertyChangeSupport;
import java.beans.PropertyVetoException;
import java.beans.VetoableChangeSupport;
import java.util.TimeZone;

/**
 *
 * @author Kenneth
 */
public class UCIPParams {
    public static final String PROP_URL = "PROP_URL";
    public static final String PROP_PORT = "PROP_PORT";
    public static final String PROP_AUTHTOKENS = "PROP_AUTHTOKENS";
    public static final String PROP_DATEFORMAT = "PROP_DATEFORMAT";
    public static final String PROP_REQUESTMETHOD = "PROP_REQUESTMETHOD";
    public static final String PROP_CONNECTTIMEOUT = "PROP_CONNECTTIMEOUT";
    public static final String PROP_READTIMEOUT = "PROP_READTIMEOUT";
    public static final String PROP_UCIPVERSION = "PROP_UCIPVERSION";
    public static final String PROP_USERAGENT = "PROP_USERAGENT";
    public static final String PROP_TZ = "PROP_TZ";
    public static final String PROP_HOSTNAME = "PROP_HOSTNAME";
    private String ip;
    private String hostname;
    private String port;
    private String authtokens;
    private String dateformat;
    private String requestMethod;
    private int connectTimeout;
    private int readTimeout;
    private String ucipVersion;
    private String userAgent;
    private TimeZone tz;
    private final transient PropertyChangeSupport propertyChangeSupport = new java.beans.PropertyChangeSupport(this);
    private final transient VetoableChangeSupport vetoableChangeSupport = new java.beans.VetoableChangeSupport(this);

    /**
     * @return the ip
     */
    public String getIp() {
        return ip;
    }

    /**
     * @param ip the ip to set
     */
    public void setIp(String ip) throws PropertyVetoException {
        java.lang.String oldUrl = this.ip;
        vetoableChangeSupport.fireVetoableChange(PROP_URL, oldUrl, ip);
        this.ip = ip;
        propertyChangeSupport.firePropertyChange(PROP_URL, oldUrl, ip);
    }

    /**
     * @return the port
     */
    public String getPort() {
        return port;
    }

    /**
     * @param port the port to set
     */
    public void setPort(String port) throws PropertyVetoException {
        java.lang.String oldPort = this.port;
        vetoableChangeSupport.fireVetoableChange(PROP_PORT, oldPort, port);
        this.port = port;
        propertyChangeSupport.firePropertyChange(PROP_PORT, oldPort, port);
    }

    /**
     * @return the authtokens
     */
    public String getAuthtokens() {
        return authtokens;
    }

    /**
     * @param authtokens the authtokens to set
     */
    public void setAuthtokens(String authtokens) throws PropertyVetoException {
        java.lang.String oldAuthtokens = this.authtokens;
        vetoableChangeSupport.fireVetoableChange(PROP_AUTHTOKENS, oldAuthtokens, authtokens);
        this.authtokens = authtokens;
        propertyChangeSupport.firePropertyChange(PROP_AUTHTOKENS, oldAuthtokens, authtokens);
    }

    /**
     * @return the dateformat
     */
    public String getDateformat() {
        return dateformat;
    }

    /**
     * @param dateformat the dateformat to set
     */
    public void setDateformat(String dateformat) throws PropertyVetoException {
        java.lang.String oldDateformat = this.dateformat;
        vetoableChangeSupport.fireVetoableChange(PROP_DATEFORMAT, oldDateformat, dateformat);
        this.dateformat = dateformat;
        propertyChangeSupport.firePropertyChange(PROP_DATEFORMAT, oldDateformat, dateformat);
    }

    /**
     * @return the requestMethod
     */
    public String getRequestMethod() {
        return requestMethod;
    }

    /**
     * @param requestMethod the requestMethod to set
     */
    public void setRequestMethod(String requestMethod) throws PropertyVetoException {
        java.lang.String oldRequestMethod = this.requestMethod;
        vetoableChangeSupport.fireVetoableChange(PROP_REQUESTMETHOD, oldRequestMethod, requestMethod);
        this.requestMethod = requestMethod;
        propertyChangeSupport.firePropertyChange(PROP_REQUESTMETHOD, oldRequestMethod, requestMethod);
    }

    /**
     * @return the connectTimeout
     */
    public int getConnectTimeout() {
        return connectTimeout;
    }

    /**
     * @param connectTimeout the connectTimeout to set
     */
    public void setConnectTimeout(int connectTimeout) throws PropertyVetoException {
        int oldConnectTimeout = this.connectTimeout;
        vetoableChangeSupport.fireVetoableChange(PROP_CONNECTTIMEOUT, oldConnectTimeout, connectTimeout);
        this.connectTimeout = connectTimeout;
        propertyChangeSupport.firePropertyChange(PROP_CONNECTTIMEOUT, oldConnectTimeout, connectTimeout);
    }

    /**
     * @return the readTimeout
     */
    public int getReadTimeout() {
        return readTimeout;
    }

    /**
     * @param readTimeout the readTimeout to set
     */
    public void setReadTimeout(int readTimeout) throws PropertyVetoException {
        int oldReadTimeout = this.readTimeout;
        vetoableChangeSupport.fireVetoableChange(PROP_READTIMEOUT, oldReadTimeout, readTimeout);
        this.readTimeout = readTimeout;
        propertyChangeSupport.firePropertyChange(PROP_READTIMEOUT, oldReadTimeout, readTimeout);
    }

    /**
     * @return the ucipVersion
     */
    public String getUcipVersion() {
        return ucipVersion;
    }

    /**
     * @param ucipVersion the ucipVersion to set
     */
    public void setUcipVersion(String ucipVersion) throws PropertyVetoException {
        java.lang.String oldUcipVersion = this.ucipVersion;
        vetoableChangeSupport.fireVetoableChange(PROP_UCIPVERSION, oldUcipVersion, ucipVersion);
        this.ucipVersion = ucipVersion;
        propertyChangeSupport.firePropertyChange(PROP_UCIPVERSION, oldUcipVersion, ucipVersion);
    }

    /**
     * @return the userAgent
     */
    public String getUserAgent() {
        return userAgent;
    }

    /**
     * @param userAgent the userAgent to set
     */
    public void setUserAgent(String userAgent) throws PropertyVetoException {
        java.lang.String oldUserAgent = this.userAgent;
        vetoableChangeSupport.fireVetoableChange(PROP_USERAGENT, oldUserAgent, userAgent);
        this.userAgent = userAgent;
        propertyChangeSupport.firePropertyChange(PROP_USERAGENT, oldUserAgent, userAgent);
    }

    /**
     * @return the tz
     */
    public TimeZone getTz() {
        return tz;
    }

    /**
     * @param tz the tz to set
     */
    public void setTz(TimeZone tz) throws PropertyVetoException {
        java.util.TimeZone oldTz = this.tz;
        vetoableChangeSupport.fireVetoableChange(PROP_TZ, oldTz, tz);
        this.tz = tz;
        propertyChangeSupport.firePropertyChange(PROP_TZ, oldTz, tz);
    }

    /**
     * @return the hostname
     */
    public String getHostname() {
        return hostname;
    }

    /**
     * @param hostname the hostname to set
     */
    public void setHostname(String hostname) throws PropertyVetoException {
        java.lang.String oldHostname = this.hostname;
        vetoableChangeSupport.fireVetoableChange(PROP_HOSTNAME, oldHostname, hostname);
        this.hostname = hostname;
        propertyChangeSupport.firePropertyChange(PROP_HOSTNAME, oldHostname, hostname);
    }
    
}
